import Vue from 'vue'
import Router from 'vue-router'
import routes from './routes'

Vue.use(Router)

const router = new Router({
  hashbang: false,
  history: true,
  linkActiveClass: 'active'
})

router.map(routes)

router.beforeEach(({to, next}) => {
  console.log('---------> ' + to.name)
  next()
})

export default router
